Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GRDB 7 #1642

Merged
merged 181 commits into from
Sep 29, 2024
Merged

GRDB 7 #1642

merged 181 commits into from
Sep 29, 2024

Conversation

groue
Copy link
Owner

@groue groue commented Sep 29, 2024

No description provided.

… return optionals.

Those optionals were just an annoyance. Now, nil results are replaced with `RecordError.recordNotFound`. Such an error is only expected with the IGNORE conflict policy.
GRDB 7: enhance ergonomics of record methods that insert/save/upsert and fetch
GRDB 7: Rename the CSQLite module to GRDBSQLite, and stop exporting the C SQLite functions.
GRDB now defaults read-only transactions to DEFERRED, and write transactions to IMMEDIATE. See #1483 for some context.
…ion-kind

GRDB 7: Perform all writes with immediate transactions by default
That's one less DispatchSemaphore. We don't need this method anymore.
GRDB 7: Remove DatabasePool.concurrentRead
GRDB 7: Move closer to SE-0433 Mutex
…associated-type

GRDB 7: DatabaseCursor has a primary associated type
ChatGPT remarks:

# Overview Section:

The phrase "GRDB optimally schedules those database access closures, in the best interest of the application" is vague and could benefit from more detail on how the scheduling optimizes for concurrency.

# Concurrency Warnings in Swift 6:

"We will address these issues, and provide general guidance in the following sections." This sentence suggests that detailed solutions will be discussed, but it is unclear how each error is related to the following section titles. A more specific reference to which section will cover what would help orient the reader.

# Non-Sendable Record Types Section:

The FAQ format is useful, but it could overwhelm the reader. Breaking up the FAQ into subsections with more concise answers or reordering it based on common issues could improve readability.

# Shorthand Closure Notation Section:

The explanation of why shorthand notation leads to warnings is somewhat technical. It may be helpful to clarify what "may introduce data races" means in practical terms for less experienced developers.

# Choosing Between Synchronous and Asynchronous Database Access:

The section recommends using asynchronous access but leaves open-ended guidance like "this may slow down other tasks". Adding a more concrete explanation of how to balance performance between synchronous and asynchronous approaches would benefit developers.

# General Clarification on Sendable:

Throughout the document, Sendable is mentioned frequently, but less-experienced developers might not fully understand why it matters. A short section or footnote on what Sendable is and why it’s important in Swift 6 concurrency might help provide context for readers unfamiliar with the concept.
GRDB 7: Stop mentioning the Record base class in the documentation
A Sendable async sequences plays well with apple/swift-async-algorithms
GRDB 7: ValueObservation async sequence is Sendable
It is not informative enough. Maybe Xcode has fixed the bug. And maybe #1600 helps.
@groue groue merged commit 5a9b592 into development Sep 29, 2024
8 checks passed
@groue groue deleted the GRDB7 branch September 29, 2024 07:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant